<div id="content">
    <form action="" method="post" id="saveReviewTime_ids">
        <div class="setup-title clearfix">
            <h2>设置考评月 </h2>
             <select name="revicwMonth" id="selctId" onchange='changeyear(this.value)'>
                <option value=0 selected="selected">请选择考评月</option>
                <?php if($per_list):?>
                <?php foreach($per_list as $val):?>
                <option value="<?=date('Ym',strtotime($val))?>"><?=date('Ym',strtotime($val))?></option>
                <?php endforeach;?>
                <?php endif;?>
             </select>
        </div>
       <div class="sd-box sd-top">
               <span class="sd-name">系统起动日(0天)</span>
               <span class="sd-content">
            <input id="step_date_1" name="step_date_1" class="datepicker"  type="text" value=""/>
            </span>

        </div>
        <div class="sd-box">
            <span class="sd-name">员工自评&计划制定日(3天)</span>
               <span class="sd-content">
                <input id="step_date_2" name="step_date_2" class="datepicker" type="text"  value=""/>
            </span>
         </div>
         <div class="sd-box">
                <span class="sd-name">主管评分&计划确定日(3天)</span>
                <span class="sd-content">
                <input id="step_date_3" name="step_date_3" class="datepicker" type="text"  value=""/>
            </span>
          </div>
         <div class="sd-box">
                <span class="sd-name">部门分数微调日(2天)</span>
               <span class="sd-content">
                <input id="step_date_4" name="step_date_4" class="datepicker" type="text"  value=""/>
            </span>
          </div>
         <div class="sd-box">
                <span class="sd-name">HR审批日(2天)</span>
                <span class="sd-content">
                <input id="step_date_5" name="step_date_5" class="datepicker" type="text"  value=""/>
            </span>
         </div>
         <div class="sd-box">
                <span class="sd-name">分数确认日(1天)</span>
               <span class="sd-content">
                <input id="step_date_6" name="step_date_6" class="datepicker" type="text"  value=""/>
            </span>
          </div>
         <div class="sd-box">
                <span class="sd-name">考核结束日(0天)</span>
                <span class="sd-content">
                <input id="step_date_7" name="step_date_7" class="datepicker" type="text"  value=""/>
            </span>
         </div>

         <div class="btn-box left">
                <input type="submit" value="确认提交" class="input-btn submit-btn">

         </div>
    </form>
    </div>
    <?php $this->script_block_begin(); ?>
<script type="text/javascript">
$(function() {
    $( ".datepicker" ).datepicker({ dateFormat: "yy-mm-dd" });
});
function changeyear(revicwMonth)
{
 if(revicwMonth==0){
 }else{
     jQuery.ajax({
          type:"POST",
          url:"<?=Util_JxUrls::ajax_get_days()?>",
          data:({revicwMonth:revicwMonth}),
          dataType:"json",
          success: function(data) {
              if(data.errcode){
                  var datalist = data.data;
                  if(datalist.length){
                      for(var i=0;i<datalist.length;i++){
                          $("#step_date_"+datalist[i].step_status).val(datalist[i].step_date);
                      }
                  }else{
                      for(var i=0;i<8;i++){
                          $("#step_date_"+i).val('');
                      }
                  }
              }else{
                    alert(data.data);
              }
          }
    });
 }
}
    </script>
<?php $this->script_block_end(); ?>